package main

import (
	"fmt"
	"os/exec"
)

var (
	cmds = map[string]string{
		"driver": "driver/driver.go",
		"lteafc": "lteafc/lteafc.go",
		"view":   "view/viewweb.go",
		"fmtest": "refs/fmplay.go",
		"fmweb":  "fm/fmweb.go",
		"hweb":   "handle/handle.go",
	}
)

func gotool(tool string) *exec.Cmd {
	args := []string{tool}
	return exec.Command("go", args...)
}
func main() {
	for k, v := range cmds {

		gobuild := gotool("build")
		gobuild.Args = append(gobuild.Args, "-o", "../build/"+k, "cmd/"+v)
		fmt.Println(gobuild.Args)
		gobuild.Run()
	}
}
